package com.rd.teacher.jichao.day22;


public class Foo {
    public static void main(String[] args) {
        StringBuffer a = new StringBuffer("A");
        StringBuffer b = new StringBuffer("B");
        // x = a  y = b
        operator(a, b);
        System.out.println(a + ", " + b);
    }

    public static void operator(StringBuffer x, StringBuffer y) {
        // a.append(b)
        // a -> char[]   {'A'} {'A','B'}
        x.append(y);
        // y = b = "B"    x = a = "AB"
        // y = "AB"
        y = x;
    }
}